<template>
    <div class="components-container">
        <!-- <sweet-modal ref="dialog1" class="dialog">
            <iframe :src="printUrl" style="width:800px; height:500px;margin-top:20px;"></iframe>
        </sweet-modal>
         -->
        <sweet-modal ref="dialogPrint" class="dialog" :sweetModalMaxWidth="pageWidth">
            <h3>{{title}}</h3>
            <iframe :src="printUrl" style="width:1100px; height:500px;margin-top:20px;"></iframe>
        </sweet-modal>
    </div>
</template>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>
<script>
import apiBase from "@/api/apiBase.js";
import sweetModal from "@/components/sweetModal";
import { PRINT } from "./PDF.js";
import { ORDER } from "@/const/orderConst.js";
import { formatDate, timeStringToDate } from "@/utils/date.js";
export default {
  data() {
    return {
      pageWidth: 1200,
      maxHeight: 500,
      title: null,
      printUrl: null,
      regCremationDate: null
    };
  },
  methods: {
    open(order, id, cdhid, time) {
      this.order = order;
      switch (this.order) {
        case PRINT.PDFICEDICE:
          this.title = "打印冷藏服务单";
          this.getPrintIce(id);
          break;
        case PRINT.WORKFLOW:
          this.title = "打印业务流转单";
          this.getWORKFLOW(id);
          break;
        case PRINT.PRINTBTNSEND:
          this.title = "打印按钮派车单";
          this.getBTNPRINTSEND(id, cdhid);
          break;
        case PRINT.PRINTYEWU:
          this.title = "打印业务单";  //宁波火化登记按钮 打印业务单
          this.getPRINTYEWU(id);
          break;
        case PRINT.PRINTSEND:
          this.title = "打印接尸通知单";
          this.getPRINTSEND(id, cdhid);
          break;
        case PRINT.PRINTSENDYW:  //义乌打印派车单
          this.title = "打印接尸通知单";
          if(cdhid=="A"){
          this.getPRINTSENDYW(id);
          }else{
          this.getPRINTSENDYW(time);
          }
          break;
        case PRINT.CREPROOF:
          this.title = "打印火化证明";
          this.getCREPROOF(id);
          break;
        case PRINT.PHONERECORDER:
          this.title = "打印电话记录";
          this.getPhoneRecorder(time);
          break;
        case PRINT.PDFDEADLABEL:
          this.title = "打印逝者标签";
          this.getIsShowPdfByQuZhou(getPdf => {
            this.getPrintDeadBar(id);
          });
          break;
        case PRINT.PDFFLOWSHEET:
          this.title = "打印业务流程单";
          this.getIsShowPdfByQuZhou(getPdf => {
            this.getPrintWorkFlowCard(id);
          });
          break;
        case PRINT.PDFCRENOTIES:
          this.title = "打印火化通知单";
          this.getIsShowPdfByQuZhou(getPdf => {
            this.getPrintCremationrPoor(id);
          });
          break;
        case PRINT.PDFCRENOTIESSY:
          this.title = "上虞打印火化通知单";
            this.getPrintCremationr(id);
          break;
        case PRINT.PRINTSLYJ:
          this.title = "打印守灵室押金清单";
          this.getPrintcashmoneysl(id);
          break;
        case PRINT.PRINTLCYJ:
          this.title = "打印冷藏押金清单";
          this.getPrintcashmoneylc(id);
          break;
        case PRINT.PDFBONERECEIVE:
          this.title = "打印骨灰领取单";
          this.getIsShowPdfByQuZhou(getPdf => {
            this.getPrintAshcollectionPoor(id);
          });
          break;
        case PRINT.PDFBILL:
          this.title = "打印收费单";
          this.getIsShowPdfByQuZhou(getPdf => {
            this.getPrintChargePoor(id);
          });
          break;
        case PRINT.PDFAGREEMENT:
          this.title = "打印项目协议书";
          this.getIsShowPdfByQuZhou(getPdf => {
            this.getPrintServiceProjectAgreement(id);
          });
          break;
        case ORDER.PTCRFS://打印火化登记表
          this.ptcrf(id);
          break;
        case ORDER.PRINTSLS://打印收费清单
          this.printsl(id);
          break;
        case PRINT.PDFRegList_SY:
          this.title = "打印A4收费清单";
          this.printslSY(id);
          break;  
        case ORDER.PRINTYH://打印收费清单
          this.printyh(id);
          break;
        case ORDER.PRINTSLG://打印挂账清单
          this.ptcrf(id);
          break;
        case PRINT.RETAILLIST://打印零售清单
          this.retaillist(id);
          break;
        case '打印票据'://打印票据
          this.note(id);
          break;
        case '入库'://入库汇总表
          this.arehouse(id);
          break;
        case '打印出库明细'://出库汇总表
          this.outLibrary(id);
          break;
        case '打印出库汇总明细':
          this.storehouse(id)
          break;
        case '条码打印':
          this.PrintDpg(id);
          break;
        case '打印发票':
          this.PrintInvoice(id);
          break;
        case '打印核对联':
          this.PrintHeduilian(id);
          break;
        case '打印死亡证明':
          this.PrintDeathProve(id);
          break;
        case '打印减免清单':
          this.PrintReduDetail(id);
          break;
        default:
          break;
      }
    },
    //报表打印
    report(order, data) {
      this.order = order;
      switch (this.order) {
          case PRINT.PRINTGENERALBUSSRETBYCYP:
          this.title = "打印分类汇总表";
          this.PrintGeneralBussRetByCyp(data);
          break;
        case PRINT.PDFSALESTATISTICSBYCYP:
          this.title = "打印销售业务报表（大类）";
          this.getPdfSaleStatisticsByCyp(data);
          break;
        case PRINT.PDFSALESTATISTICS:
          this.title = "打印销售业务报表";
          this.getPrintSaleStatistics(data);
          break;
        case PRINT.PDFCEMBUSSRETBYCYP:
          this.title = "打印火化业务报表（大类）";
          this.getPrintCemBussRetByCyp(data);
          break;
        case PRINT.PDFCEMBUSSRET:
          this.title = "打印火化业务报表";
          this.getPrintCemBussRet(data);
          break;
        case PRINT.PDFBASICSERSTATISTICS:
          // 打印杭州市区殡葬基本服务对象费用结算清册
          this.title = "打印减免明细表";
          this.getPrintBasicserStatistics(data);
          break;
        case PRINT.PDFCREMERADDRESSBYTOWN:
          this.title = "萧山区遗体火化报表";
          this.getPrintCremerAddressByTown(data);
          break;
        case PRINT.PDFCREMERADDRESSBYHOLD:
          this.title = "萧山区遗体火化报表";
          this.getPrintCremerAddressByHold(data);
          break;
        case PRINT.PDFGENERALBUSSRETBYCYP:
          this.title = "打印全部业务报表（大类）";
          this.getPrintGeneralBussRetByCyp(data);
          break;
        case PRINT.PDFBILLRECORD:
          this.title = "打印挂账费用明细表";
          this.getPrintBillRecord(data);
          break;  
        case PRINT.PDFPROJECT:
          this.title = "打印分类项目汇总表";
          this.getPrintProjectSummary(data);
          break;  
        case PRINT.PDFRUNNING:
          this.title = "打印流水账汇总表";
          this.getPrintRrunningAccountRecordSummary(data);
          break;
        case PRINT.PDFGENERALBUSSRET:
          this.title = "打印全部业务报表";
          this.getPrintGeneralBussRet(data);
          break;
        case PRINT.PDFHANGBUSSRETBYCYP:
          this.title = "打印全部挂账报表（大类）";
          this.getPrintHangBussRetByCyp(data);
          break;
        case PRINT.PDFHANGBUSSRET:
          this.title = "打印全部挂账报表";
          this.getPrintHangBussRet(data);
          break;
        case PRINT.PDFREDUCTIONSTATISTICS:
          this.title = "打印殡葬惠民政策减免情况汇总表";
          this.getPrintReductionStatistics(data);
          break;
        case PRINT.PDFDEADFILESEARCH:
          this.title = "打印逝者档案查询";
          this.getPrintDeadFileSearch(data);
          break;
        case PRINT.PDFBODYOUT:
          this.title = "打印遗体外运查询";
          this.getPrintBodyout(data);
          break;
        case PRINT.PDFICEDISPATCHSEARCH:
          this.title = "打印冷藏使用查询";
          this.getPrintIceDispatchSearch(data);
          break;
        case PRINT.PDFSTAFF:
          this.title = "打印员工补贴信息表";
          this.getPrintstaffsubsidyReport(data);
          break;
        case PRINT.PDFBUSINESSCHARGESEARCH:
          this.title = "打印业务收费";
          this.getPrintBusinesschargeSearch(data);
          break;
        case PRINT.PDFDEPOSITMATURITYSEARCH:
          this.title = "打印寄存到期查询";
          this.getPrintDepositmaturitySearch(data);
          break;
        case PRINT.PDFDRIVERS:
          this.title = "驾驶员出车统计表";
          this.getPrintDriversStatic(data);
          break;
        case '打印零售汇总表':
          this.title = "零售汇总表";
          this.PrintRetailSummary(data);
          break;
        case '打印骨灰盒使用汇总表':
          this.title = "骨灰盒使用汇总表";
          this.PrintGhhSaleStatistics(data);
          break;
          //舟山联办统计
        case '打印文明丧葬统计':
          this.title = "文明丧葬统计";
          this.PrintcivilizedMourning(data);
          break;
        case '打印联办事项完成情况统计':
          this.title = "联办事项完成情况统计";
          this.PrintcompleteRate(data);
          break;
        case '打印生态奖补查询':
          this.title = "生态奖补查询";
          this.PrintEnvironAwardReport(data);
          break;
        case '打印业务办理统计':
          this.title = "业务办理统计";
          this.PrintBusiness(data);
          break;
        case '打印业务收入表':
          this.title = "打印业务收入表";
          this.getBusinesCharge(data);
          break;
        case '打印火化人员汇总报表':
          this.title = "打印火化人员汇总报表";
          this.PrintCreUserSummary(data);
          break;
        case '打印丧葬用品销售数量统计表':
          this.title = "打印丧葬用品销售数量统计表";
          this.PrintSZYPSaleReport(data);
          break;
        case '打印收入明细表':
          this.title = "打印收入明细表";
          this.PrintIncomeDetailReport(data);
          break;
        default:
      }
    },
    // 打印骨灰盒使用汇总表
    PrintGhhSaleStatistics(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintGhhSaleStatistics,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    // 打印零售汇总表
    PrintRetailSummary(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintRetailSummary,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
     // 丧葬商品条码打印
    PrintDpg(id){
      let data = {
        DPGID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintDpg,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    PrintInvoice(id){
      let data = {
        CHDID: id
      };
      apiBase.DoService(data, apiBase.getApiAdress().Pdf.PrintRetailInvoice, res => {
        this.printUrl = res.data.content.PDFNAME;
        // this.printTitle = "发票打印";
        this.$refs.dialogPrint.open();
      });
    },
    PrintHeduilian(id){
      let data = {
        CHDID: id
      };
      apiBase.DoService(data, apiBase.getApiAdress().Pdf.PrintNuclearCouplet, res => {
        this.printUrl = res.data.content.PDFNAME;
        // this.printTitle = "发票打印";
        this.$refs.dialogPrint.open();
      });
    },
    //打印死亡证明单
    PrintDeathProve(id){
      let data = {
        JPMID: id
      };
      apiBase.DoService(data, apiBase.getApiAdress().Pdf.PrintDeathProve, res => {
        this.printUrl = res.data.content.PDFNAME;
        // this.printTitle = "发票打印";
        this.$refs.dialogPrint.open();
      });
    },
    //打印减免清单
    PrintReduDetail(id){
      let data = {
        CHDID: id
      };
      apiBase.DoService(data, apiBase.getApiAdress().Pdf.PrintReduDetail, res => {
        this.printUrl = res.data.content.PDFNAME;
        this.$refs.dialogPrint.open();
      });
    },
    //结账打印票据
    note(id){
      let data = {
        CHDID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintBusinesschargeBill,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    //打印入库明细
    arehouse(id){
      let data = {
        DPIID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintDpl,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
      });
    },
    //打印入库明细
    outLibrary(id){
      let data = {
        DPOID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintDol,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
      });
    },
    //打印出库汇总明细
    storehouse(id){
      let data = {
        HSLID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintHsl,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
      });
    },
    
    //打印火化登记表
    ptcrf(id){
      let data = {
        CHDID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintReg,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    //打印零售清单
    retaillist(id){
      console.log(id);
        let data = {
            CHDID: id
          };
        apiBase.DoService(
          data,
          apiBase.getApiAdress().Pdf.PrintRetailchargelist, 
          res => {
            this.printUrl = res.data.content.PDFNAME;
            this.printTitle = "零售清单打印";
            this.$refs.dialogPrint.open();
        });
    },
    //打印火化清单
    printsl(id){
      let data = {
        CHDID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintRegList,
        res => {
          console.log(res);
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    //打印A4收费清单
    printslSY(id){
      let data = {
        CHDID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintRegList_SY,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    //打印延后结算单
    printyh(id){
      let data = {
        YHDID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintFreeSettlement,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    //打印火化证明
    printcp(id){
      console.log(0);
      console.log(id);
      let data = {
        REGID:id
      };
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintRetailchargelist,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    //获取业务流转单URL
    getWORKFLOW(id) {
      let data = {
        REGID: id
      };
      apiBase.DoService(data, apiBase.getApiAdress().Pdf.PrintReg, res => {
        this.printUrl = res.data.content.PDFNAME;
        this.$refs.dialogPrint.open();
      });
    },
    //打印业务单（宁波需求）
    getPRINTYEWU(regid) {
      let data = {
        REGID: regid,
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintBusinessReg,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        },
        res => {
          this.$message.error(res.data.msg);
          this.loading = false;
        }
      );
    },
    //获取接尸通知单URL
    getPRINTSEND(prpid, cdhid) {
      let data={};
      if(prpid){
       data = {
        PRPID: prpid,
      };
      }else{
      data = {
        CDHID: cdhid
      };
      }
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintCdh,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        },
        res => {
          this.$message.error(res.data.msg);
          this.loading = false;
        }
      );
    },
    //获取接尸通知单URL
    getBTNPRINTSEND(prpid, cdhid) {
      let  data = {
        CDHID: cdhid
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PatchingCdh,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        },
        res => {
          this.$message.error(res.data.msg);
          this.loading = false;
        }
      );
    },
    //义乌获取接尸通知单URL
    getPRINTSENDYW(prpid) {
      let data = {
        PRPID: prpid,
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintCdh,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        },
        res => {
          this.$message.error(res.data.msg);
          this.loading = false;
        }
      );
    },
    //获取火化证明URL
    // getCREPROOF(id, time, isPrint) {
    //   let data = {
    //     REGID: id,
    //     REGCREMATIONDATE: formatDate(time, "yyyyMMdd"),
    //     isPrint: isPrint
    //   };
    //   apiBase.DoService(
    //     data,
    //     apiBase.getApiAdress().Pdf.UpdatePrintCre,
    //     res => {
    //       this.printUrl = res.data.content.PDFNAME;
    //       this.$refs.dialogPrint.open();
    //     }
    //   );
    // },
    getCREPROOF(id) {
      let data = {
        REGID: id,
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.UpdatePrintCre,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    getPhoneRecorder(time) {
      let data = { WorkDateEquals: time };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Reserve.PrintTelephonerecord,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印分类汇总表
    getPdfSaleStatisticsByCyp(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintSaleStatisticsByCyp,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
        //打印分类汇总表
    PrintGeneralBussRetByCyp(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintGeneralBussRetByCypId,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印销售业务报表
    getPrintSaleStatistics(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintSaleStatistics,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印火化业务报表（大类）
    getPrintCemBussRetByCyp(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintCemBussRetByCyp,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印火化业务报表
    getPrintCemBussRet(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintCemBussRet,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印全部业务报表（大类）
    getPrintGeneralBussRetByCyp(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintGeneralBussRetByCyp,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印流水账汇总表
    getPrintRrunningAccountRecordSummary(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintRrunningAccountRecordSummary,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印全部业务报表
    getPrintGeneralBussRet(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintGeneralBussRet,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印全部挂账报表（大类）
    getPrintHangBussRetByCyp(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintHangBussRetByCyp,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印全部挂账报表
    getPrintHangBussRet(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintHangBussRet,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印殡葬惠民政策减免情况汇总表
    getPrintReductionStatistics(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintReductionStatistics,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印杭州市区殡葬基本服务对象费用结算清册
    getPrintBasicserStatistics(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintBasicserStatistics,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印萧山区遗体火化报表
    getPrintCremerAddressByTown(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintCremerAddressByTown,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印萧山区遗体火化报表
    getPrintCremerAddressByHold(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintCremerAddressByHold,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印逝者档案查询
    getPrintDeadFileSearch(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintDeadFileSearch,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印遗体外运查询
    getPrintBodyout(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintBodyoutage,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印冷藏使用查询
    getPrintIceDispatchSearch(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintIceDispatchSearch,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印冷藏使用查询
    getPrintstaffsubsidyReport(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintstaffsubsidyReport,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印冷藏使用查询
    getPrintIce(regid) {
     let data = {
        REGID:regid
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintColdService,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印业务收费
    getPrintBusinesschargeSearch(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintQueryBusscharge,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印寄存到期查询
    getPrintDepositmaturitySearch(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintQueryBeoverdue,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印驾驶员出车统计表
    getPrintDriversStatic(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintDriverStatistics,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //是否显示衢州PDF
    getIsShowPdfByQuZhou(getPdf) {
      let data = {};
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Param.GetIsShowPdfByQuZhou,
        res => {
          let param = res.data.content;
          if (param) {
            getPdf();
          }
        }
      );
    },
    //打印逝者标签
    getPrintDeadBar(prpid) {
      let data = {
        PRPID: prpid
      };
      apiBase.DoService(data, apiBase.getApiAdress().Pdf.PrintDeadBar, res => {
        this.printUrl = res.data.content.PDFNAME;
        this.$refs.dialogPrint.open();
      });
    },
    //打印业务流程单
    getPrintWorkFlowCard(prpid) {
      let data = {
        PRPID: prpid
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintWorkFlowCard,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印火化通知单
    getPrintCremationrPoor(regid) {
      let data = {
        REGID: regid
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintCremationrPoor,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //(上虞)打印火化通知单
    getPrintCremationr(regid) {
      let data = {
        REGID: regid
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintCremationr,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //(上虞)打印押金清单
    getPrintcashmoneysl(regid) {
      let data = {
        YHDID: regid,
        YHLSOURCE:"B"
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintDeposit,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    getPrintcashmoneylc(regid) {
      let data = {
        YHDID: regid,
        YHLSOURCE: "C",
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintDeposit,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印骨灰领取单
    getPrintAshcollectionPoor(regid) {
      let data = {
        REGID: regid
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintAshcollectionPoor,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印收费单
    getPrintChargePoor(chdid) {
      let data = {
        CHDID: chdid
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintChargePoor,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印挂账费用明细表
    getPrintBillRecord(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintBillRecord,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印分类项目汇总表
    getPrintProjectSummary(data) {
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintProjectSummary,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    //打印项目协议书
    getPrintServiceProjectAgreement(chdid) {
      let data = {
        CHDID: chdid
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Pdf.PrintServiceProjectAgreement,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        }
      );
    },
    // 打印文明丧葬统计
    PrintcivilizedMourning(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Report.PrintCivilizedStatistics,
        res => {
          this.printUrl = res.data.content;
          this.$refs.dialogPrint.open();
        });
    },
    // 联办事项完成情况统计
    PrintcompleteRate(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Report.PrintCompleteRateStatistics,
        res => {
          this.printUrl = res.data.content;
          this.$refs.dialogPrint.open();
        });
    },
    // 生态奖补统计查询打印
    PrintEnvironAwardReport(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Report.PrintEnvironAwardReport,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
      // 打印业务办理统计
    PrintBusiness(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Report.PrintBusinessProcessingStatistics,
        res => {
          this.printUrl = res.data.content;
          this.$refs.dialogPrint.open();
        });
    },
      // 打印业务办理统计
    getBusinesCharge(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Pdf.PrintBusinessIncomeByCyp,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    // 打印火化人员汇总
    PrintCreUserSummary(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Report.PrintCrematedPopulation,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    // 打印丧葬用品销售数量统计表 
    PrintSZYPSaleReport(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Report.PrintSZYPSaleReport,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
    // 打印收入明细表 
    PrintIncomeDetailReport(data){
      apiBase.DoService(
        data, 
        apiBase.getApiAdress().Report.PrintIncomeDetailReport,
        res => {
          this.printUrl = res.data.content.PDFNAME;
          this.$refs.dialogPrint.open();
        });
    },
  },
  components: {
    sweetModal
  }
};
</script>

